<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <input type="text" />
  <ul></ul>
  <div></div>
  <script>
    let oInput = document.querySelector("input");
    let oUl = document.querySelector("ul");
    let oDiv = document.querySelector("div");
    oInput.oninput = function () {
      let val = oInput.value;
      let oScript = document.createElement("script");
      oScript.src = `https://suggest.taobao.com/sug?code=utf-8&q=${val}&_ksTS=1591257683085_275&callback=jsonp&k=1&area=c2c&bucketid=18`;
      document.body.appendChild(oScript);
    };
    function jsonp(data) {
      let result = data.result;
      let magic = data.magic;
      let str = "";
      result.forEach((item) => {
        str += `<li>${item[0]}</li>`;
      });
      oUl.innerHTML = str;
    }
  </script>
</body>
</html>